﻿using Microsoft.AspNetCore.Http;
using Models.Common;
using Newtonsoft.Json;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using UtilsORM;
using UtilsORM.MySqlData;

////using System.Web.Script.Serialization;

namespace ServiceWeb.DBGateway
{
    public class DBIotDeviceCommandLog
    {


        EFYihongIotContext ef = new EFYihongIotContext();
        public List<iot_device_command_log> getCommandLogListByRows(string dguid, int rows)
        {
            return ef.iot_device_command_log.Where(c => c.l_d_guid == dguid).OrderByDescending(c => c.l_id).Take(rows).ToList();
        }
    }
}
